﻿#ifndef FILRECTANGLE_H
#define FILRECTANGLE_H

#include <QObject>
#include <QQuickPaintedItem>
#include <QPainter>
#include "../common/stdafx.h"

class FilRectangle : public QQuickPaintedItem
{
    Q_OBJECT
    Q_PROPERTY_AUTO(QColor, color)
    Q_PROPERTY_AUTO(QList<int>, radius)
    Q_PROPERTY_AUTO(qreal, borderWidth)
    Q_PROPERTY_AUTO(QColor, borderColor)
    Q_PROPERTY_AUTO(Qt::PenStyle, borderStyle)
    Q_PROPERTY_AUTO(QVector<qreal>, dashPattern)
    QML_NAMED_ELEMENT(FilRectangle)
public:
    explicit FilRectangle(QQuickItem *parent = nullptr);
    bool borderValid() const;
    void paint(QPainter *painter) override;
};

#endif // FILRECTANGLE_H
